﻿using System;
using System.Xml.Serialization;
using DC2010.Objects.Base;

namespace DC2010.Objects.Data
{
    [Serializable]
    public class RuneInfo : BaseInfo
    {
        /// <summary>
        /// Description of the rune
        /// </summary>
		[XmlAttribute]
        public string Description { get; set; }	

        /// <summary>
        /// This attribute tells us how much mana rune will take. For example: In original dungeon master is "MON" RuneStrength 6.
        /// </summary>
		[XmlAttribute]
        public int RuneStrength { get; set; }		
		
        /// <summary>
        /// First rune level is first row o runes. 
        /// </summary>
		[XmlAttribute]
        public int RuneLevel { get; set; }	

        /// <summary>
        /// Id of this party leader
        /// </summary>
		[XmlAttribute]
        public Elements Elements { get; set; }	
	
        public RuneData CreateData()
        {
            RuneData cd = new RuneData();

            cd.InfoId = Id;
            cd.Id = cd.InfoId + "_" + Guid.NewGuid().ToString();
            //TODO: fill with other properties
            Root.log.InfoFormat("Core, Created new object with id: {0} based on object {1}", cd.Id, cd.InfoId);
            Root.I.RuneSystem.AddData(cd);



            return cd;
        }
    }
	
	public enum Elements
	{
		Water = 1,
		Earth = 2,
		Fire = 3,
		Air = 4
	}
}
